package cn.wolfcode.mapper;

import cn.wolfcode.domain.News;
import cn.wolfcode.qo.NewsObject;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NewsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(News record);

    News selectByPrimaryKey(Long id);

    List<News> selectAll();

    int updateByPrimaryKey(News record);

    List<News> selectForList(QueryObject qo);

    List<News> selectList(NewsObject qo);

    void updateOne(@Param("id") Long id, @Param("statuss") boolean statuss);
      //必须要加上@Param这个标签,要不然找不到对应的属性
    void updateisRead(@Param("id") Long id,@Param("isRead") boolean isRead);
}